package com.example.web.service.checkCabinetStatus.impl;

import com.example.web.enums.StorageCabinetStatus;
import com.example.web.service.checkCabinetStatus.CheckCanOpenDoorService;
import org.springframework.stereotype.Service;

import java.lang.reflect.Array;
import java.util.Arrays;

@Service
public class UserActionCheck implements CheckCanOpenDoorService {
    @Override
    public boolean checkOpenStatusLegitimate(StorageCabinetStatus status) {
        /*待取件和已关闭的订单都可以开门*/
        if (Arrays.asList(StorageCabinetStatus.TO_BE_PICKUP, StorageCabinetStatus.CLOSE).contains(status)) {
            return true;
        }
        return false;
    }
}
